<html>

<head>
<title>微信公共平台</title>
<meta charset="utf-8">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<script type="text/javascript" src="scripts/jquery.js"></script>
<script type="text/javascript" src="scripts/jweixin-1.1.0.js"></script>
<script type="text/javascript" src="scripts/jssdk.js"></script>
<script type="text/javascript">
	//initShareParam.url = location.href.split('#')[0]; // 当前页面地址
	var paramJSON = {
		title : document.title,
		desc : '测试',
		link : location.href,
		imgUrl : 'http://pic5.qiyipic.com/image/20150714/11/f5/a_100012614_m_601_m1_195_260.jpg',
		type : 'link', // 分享类型,music、video或link，不填默认为link
		dataUrl : '', // 如果type是music或video，则要提供数据链接，默认为空
		success : function() {
			alert("分享成功");
		},
		cancel : function() {
			alert("分享取消");
		},
		fail : function() {
			alert("分享失败");
		}
	};
	initJSSDK(initShareParam, paramJSON);
</script>
</head>

<body>
	<input id="share" name="分享" type="button" value="分享" />
	<h1>微信公共平台开发者接口</h1>
</body>

</html>